package old.property;

import java.util.Date;

public class Video implements Cloneable{
    private String name;
    private Date data;

    public Video(String name, Date data) {
        this.name = name;
        this.data = data;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        var obj = (Video) super.clone();
        obj.data = (Date) data.clone();
        return  obj;
    }

    public void setData(Date data) {
        this.data = data;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Video{" +
                "name='" + name + '\'' +
                ", data=" + data +
                '}';
    }
}
